import java.util.Random;
import java.util.Scanner;

public class Randoms
{
    public static void main (String[] args)
    {
        Random random = new Random();
        Scanner in = new Scanner(System.in);
        
        int six = 0;
        int five = 0;
        int four = 0;
        int three = 0;
        int BaoDi = 0;
        int Bao = 0;
        
        System.out.println("请输入抽数：（输入0终止）");
        int Chou = in.nextInt();
        while(Chou != 0)
        {
            for(int i = 0; i <= Chou; i++)
            {
                int x = random.nextInt(101);
        
                if(BaoDi >= 50)
                {
                    if(x <= 2 || x == 11 || x == 61)
                    {
                        six++;
                        BaoDi = 0;
                        Bao++;
                    }
                    if(x > 2 && x <= 10)
                    {
                        five++;
                        BaoDi++;
                    }
                    if(x > 11 && x <= 60)
                    {
                        four++;
                        BaoDi++;
                    }
                    if(x > 62)
                    {
                        three++;
                        BaoDi++;
                    }
                }
                else
                {
                    if(x <= 2)
                    {
                        six++;
                        BaoDi = 0;
                    }
                    if(x > 2 && x <= 10)
                    {
                        five++;
                        BaoDi++;
                    }
                    if(x > 10 && x <= 60)
                    {
                        four++;
                        BaoDi++;
                    }
                    if(x > 60)
                    {
                        three++;
                        BaoDi++;
                    }
                }
            }
    
            System.out.println("抽数: " + Chou);
            System.out.println("6: " + six);
            System.out.println("保底次数: " + Bao);
            System.out.println("5: " + five);
            System.out.println("4: " + four);
            System.out.println("3: " + three);
    
            six = 0;
            five = 0;
            four = 0;
            three = 0;
            BaoDi = 0;
            Bao = 0;
    
            System.out.println("请输入抽数：（输入0终止）");
            Chou = in.nextInt();
        }
    }
}
